import { View, AppRegistry, Text } from 'react-native'
import { DatePicker, List, Toast,Button, WingBlank, Icon } from 'antd-mobile';
import React, { Component } from 'react'
import { createForm } from 'rc-form'

class RN_AntdM_Starter extends Component {
  showToast() {
    Toast.loading('加载中...', () => {
      console.log('加载完成!!!');
    });
  }
  render() {
    return (<View style={{ marginTop: 20 }}>
      <List>
        <List.Body>
          <DatePicker
            mode="datetime"
            {...this.props.form.getFieldProps('datetime')}
          >
            <List.Item
              arrow="horizontal"
              last
            >
              选择时间
            </List.Item>
          </DatePicker>
        </List.Body>
      </List>
      <List>
        <List.Body>
          <WingBlank>
            <Button type="primary" onClick={this.showToast}>纯文字 toast</Button>
            <Text>aff</Text>
          </WingBlank>
        </List.Body>
      </List>
    </View>)
  }
}

RN_AntdM_Starter = createForm()(RN_AntdM_Starter)

AppRegistry.registerComponent('RN_AntdM_Starter', () => RN_AntdM_Starter)
